package qdu.edu.com.fushanf4.service.clean.item;

import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import qdu.edu.com.fushanf4.utils.ConfigurationUtil;
import qdu.edu.com.fushanf4.utils.DriverUtil;
import java.io.IOException;

/**
 * 用来切分item_desc_dataset.txt数据集,获得商品描述的那一列
 */
public class SplitItemDescriptionDriver extends DriverUtil {
    public static void main(String[] args) throws IOException {
        SplitItemDescriptionDriver splitItemDescriptionDriver=new SplitItemDescriptionDriver();
        splitItemDescriptionDriver.run(args);
    }

    @Override
    public Job runJob(String[] path) throws IOException{
        Job job = ConfigurationUtil.getJob();

        job.setJarByClass(SplitItemDescriptionDriver.class);

        job.setMapperClass(SplitItemDescriptionMapper.class);
        job.setOutputKeyClass(NullWritable.class);
        job.setOutputValueClass(Text.class);

        assert ConfigurationUtil.setPathAndRunJob(path,job);
        return job;

    }

}
